Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

term-size

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

term-size

Reliably get the terminal window size (columns & rows)

  • 2.2.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3.3M
decreased by-31.14%
Maintainers
1
Weekly downloads
 
Created

What is term-size?

The term-size npm package is a simple utility that allows you to get the size (width and height) of the terminal window in which your Node.js application is running. It's particularly useful for CLI applications that need to adjust their output based on the available terminal space.

What are term-size's main functionalities?

Get Terminal Size

This feature allows you to retrieve the current size of the terminal (width as columns and height as rows). The code sample demonstrates how to use term-size to get the terminal dimensions and then print them to the console.

const termSize = require('term-size');

const {columns, rows} = termSize();
console.log(`Columns: ${columns}, Rows: ${rows}`);

Other packages similar to term-size

Keywords

FAQs

Package last updated on 25 Oct 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc